package cn.mw.cmdb.virtualization.enums;

/**
 * @description 虚拟机状态枚举
 */
public enum VirtualizationVMStatusEnum {
    POWERED_OFF("poweredOff","0"),
    POWERED_ON("poweredOn","1"),
    SUSPENDED("suspended","2"),
    ;


    private String status;

    private String value;

    VirtualizationVMStatusEnum(String status, String value) {
        this.status = status;
        this.value = value;
    }

    public String getStatus() {
        return status;
    }

    public String getValue() {
        return value;
    }

    public static VirtualizationVMStatusEnum getVMStatusEnum(String value) {
        for (VirtualizationVMStatusEnum vmStatusEnum : values()) {
            if (value.equals(vmStatusEnum.getValue())) {
                return vmStatusEnum;
            }
        }
        return null;
    }
}
